<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    setTimeout(() => {
        console.log("A");
        Promise.resolve().then(() => {
        console.log("B");
        });
    }, 1000);

    Promise.resolve().then(() => {
        
        console.log("C");
    });
    
    new Promise((resolve) => {
        console.log("D");
        
        resolve("");
    }).then(() => {
        console.log("E");
    });
    
    async function sum(a, b) {
        console.log("F");
    }
    
    async function asyncSum(a, b) {
        
        await Promise.resolve();
        console.log("G");
        return Promise.resolve(a + b);
    }
     
    sum(3, 4);
    asyncSum(3, 4);
    console.log("H");

    // c d e f g 7 a b h
    // D F H C E G A B


    /**
     * A logG
     * H set
     * W 
     * D F H C E G A B
    */

    
    </script>
</body>
</html>